<template>
  <button type="button" class="lineBtn" @click="callback" style="width: 100%; margin-left: 0">测试是否通</button>
</template>

<script setup>
const callback = () => {
  // GET 请求示例
  uni.request({
    url: 'http://172.16.9.205:3000/getno', // 请求的接口地址
    method: 'GET',
    data: {
      // id: 1,
      // page: 1
    },
    header: {
      // 'content-type': 'application/json'
    },
    success: (res) => {
      console.log('请求成功：', res.data);
      // let content = res.data.content;
    },
    fail: (err) => {
      console.log('请求失败：', err);
    },
    complete: () => {
      console.log('请求完成');
    }
  });
};
</script>

<style scoped lang="scss">
.lineBtn {
  display: block;
  width: 80%;
  margin-left: 10%;
  padding: 0;
  height: 50px;
  border-radius: 100px;
  line-height: 50px;
  background: #1e9fff;
  color: #ffffff;
  border: none;
  font-size: 16px;
}
</style>
